import axios from '@/utils/axios'
import type { UserVO } from '@/types'

export const userApi = {
  async updateProfile(data: Partial<UserVO>) {
    const response = await axios.put<UserVO>('/users/profile', data)
    return response
  },

  async getUserArticles(userId: number) {
    const response = await axios.get(`/users/${userId}/articles`)
    return response
  },

  async getUserFavorites(userId: number) {
    const response = await axios.get(`/users/${userId}/favorites`)
    return response
  },
}
